

def hnt(n, a, b, c):
    if n == 1:
        print(f"{a}--->{c}")
    else:
        hnt(n-1, a, c, b)
        print(f"{a}--->{c}")
        hnt(n-1, b, a, c)



hnt(3, 'A', 'B', 'C')